package com.tedu.day04mybatis.mapper;

import com.tedu.day04mybatis.pojo.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface UserMapper {

    @Insert("insert into user(username,password,nickname,age,created) values(#{username},#{password},#{nickname},#{age},#{created})")
    int insert(User user);

    @Update("update user set username=#{username},password=#{password},nickname=#{nickname},age=#{age},created=#{created} where id=#{id}")
    int update(User user);
}
